<include file="public/layout" />
<script src="__ROOT__/public/static/js/layer/laydate/laydate.js"></script>
<body style="background-color: #FFF; overflow: auto;"> 
<div class="page">
  <div class="fixed-bar">
    <div class="item-title"><a class="back" href="javascript:history.back();" title="返回列表"><i class="fa fa-arrow-circle-o-left"></i></a>
      <div class="subject">
        <h3> 广告详情</h3>
        <h5>广告添加与管理</h5>
      </div>
    </div>
  </div>
    <!--表单数据-->
    <form method="post" id="handleposition" action="{:U('Admin/Ad/adHandle')}">  
    <div class="ncap-form-default">
      <dl class="row">
        <dt class="tit">
          <label for="ac_name"><em>*</em>广告名称：</label>
        </dt>
        <dd class="opt">
          <input type="text" placeholder="名称" class="input-txt" name="ad_name" value="{$info.ad_name|default="自定义广告名称"}">
		  <span class="err" id="err_ad_name" style="color:#F00; display:none;">广告名称不能为空</span>                                                  
          <p class="notic"></p>
        </dd>
      </dl>	   
	  <dl class="row">
        <dt class="tit" colspan="2">
          <label class="" for="s_sort">广告类型：</label>
        </dt>
        <dd class="opt">
          <div id="gcategory">
            <select name="media_type" class="input-sm" class="form-control">
                 <option value="0">图片</option>                                             
                 <option value="1">flash</option>
            </select>                   
          </div>          
        </dd>
      </dl> 
	  <dl class="row">
        <dt class="tit" colspan="2">
          <label class="" for="s_sort">广告位置：</label>
        </dt>
        <dd class="opt">
          <div id="gcategory">
            <select name="pid" class="input-sm" class="form-control">
                <volist name="position" id="item">
                       <option value="{$item.position_id}" <if condition="$info[pid] eq $item[position_id]">selected</if>>{$item.position_name}</option>
               </volist>                  
            </select>                 
          </div>          
        </dd>
      </dl>       
	  <dl class="row">
        <dt class="tit">
          <label for="articleForm">开始日期：</label>
        </dt>
        <dd class="opt">
            <input type="text" class="input-txt" id="start_time" name="begin"  value="{$info.start_time|default="2016-01-01"}"/>             
          <span class="err"></span>
        </dd>
      </dl>    
	  <dl class="row">
        <dt class="tit">
          <label for="articleForm">结束时间：：</label>
        </dt>
        <dd class="opt">
            <input type="text" class="input-txt" id="end_time" name="end"  value="{$info.end_time|default="2019-01-01"}"/>             
          <span class="err"></span>
        </dd>
      </dl>        
      <dl class="row">
        <dt class="tit">
          <label for="ac_name"><em>*</em>广告链接：</label>
        </dt>
        <dd class="opt">
          <input type="text" placeholder="广告链接" class="input-txt" name="ad_link" value="{$info.ad_link}">
		  <span class="err" id="err_ad_link" style="color:#F00; display:none;"></span>
          <p class="notic"></p>
        </dd>
      </dl>	       
	   <dl class="row">
        <dt class="tit">广告图片：</dt>
        <dd class="opt">
          <div class="input-file-show" id="divComUploadContainer">
            <span class="type-file-box">            
            <input type="text" id="ad_code" name="ad_code" value="{$info.ad_code}" class="type-file-text">            
            <input type="button" class="type-file-button" onClick="GetUploadify(1,'ad_code','ad','')" value="上传图片"/>           
            </span>
          </div>
          <div id="thumbnails" class="ncap-thumb-list">
            <h5><i class="fa fa-exclamation-circle"></i> 请上传图片格式文件。</h5>
            <ul>
            </ul>
          </div>
        </dd>
      </dl>      
      <dl class="row">
        <dt class="tit">
          <label for="ac_name"><em>*</em>背景颜色：：</label>
        </dt>
        <dd class="opt">
          <input type="text" placeholder="背景颜色：" class="input-txt" name="bgcolor" type="color" value="{$info.bgcolor}"  />
		  <span class="err" id="err_bgcolor" style="color:#F00; display:none;"></span>
          <p class="notic"></p>
        </dd>
      </dl>                 		 		       
      <dl class="row">
        <dt class="tit">
          <label for="ac_sort">默认排序：</label>
        </dt>
        <dd class="opt">
          <input type="text" placeholder="排序" name="orderby" value="{$info.orderby}" class="input-txt">
          <span class="err"></span>
          <p class="notic"></p>
        </dd>
      </dl>
	   	
                              
      <div class="bot"><a href="JavaScript:void(0);" onclick="adsubmit()" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a></div>
    </div>
       <input type="hidden" name="act" value="{$act}">
       <input type="hidden" name="ad_id" value="{$info.ad_id}">
  </form>
</div>
 <script>
	 function adsubmit(){
		$('#handleposition').submit();
	}
	
    $(document).ready(function(){
		$('#start_time').layDate();
		$('#end_time').layDate();
	});
 </script>
</body>
</html>